<!doctype html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>unused plugin title (your plugin folders name is the title visible to the user)</title>
    <style>
      /*
        construct the HTML, CSS (inline or linked) validly to your liking
        with the exception of the initialising JS
        (as needed to being present but which may reside in its own file)
      */
    </style>
  </head>
  <body>
    <script>
      /*
        you have to provide this function !


        parameters:
        
          message:  object having key "pluginParent" having object, having
                    following keys, as value:
          
            callback: function you are requested to call passing the
                      type of your plugin and a stop_Method function
                      (see below for further documentation).
                  
            version:  JS data type number representing the map's HTML's code
                      version to help you decide to possibly not letting continue
                      execution of your plugin if it is made for a different
                      version of the map's HTML's code, "throw" a string in that case
                      to have initialisation of your plugin be aborted (see example
                      plugins), that string is shown to the user.
                      The map's HTML's code contains the map's toolbar's HTML's code.
                      The current map's HTML's version is 1. It is intended to not
                      be changed in the forseeable future by the first party.
                      Consider alerting the user when you not let continue
                      execution of your plugin.


        returns:
        
          object: can have (regarding availability see below for callback documentation)
                  key:
          
            request_MapAccess:  function, call that to get DOM access to the map's
                                HTML's code.
                                Can be denied by the user.
                                Returns false when so else the DOM document.
              
            toolbarAPI:         object (see assets/2021-a/toolbarAPI.js in
                                the web folder of this Little Navmap
                                installation for the documentation of
                                the toolbar API).
                    
            run:                function, call that to make your plugin visible,
                                necessary depending on the type of your plugin
      */
      function init (message) {
        
        var returned_Value = message.pluginParent.callback(message.pluginParent.callback.TYPE_XXX, stop_Method);
        /*
          3 callback types are available:
          
          message.pluginParent.callback.TYPE_BACKGROUND :
            your plugin runs in your file
            in the object returned by message.pluginParent.callback:
            "toolbarAPI" not available
            "run" not available
            remember to call "request_MapAccess" if you want to
            access the map DOM.
        
          message.pluginParent.callback.TYPE_UNOBTRUSIVE :
            your plugin file is rendered above the whole map without
            interactivity in its display (pointer-events: none,
            background of iframe used, set to transparent),
            possibility to add your own toolbar entries to the existing
            map toolbar using the toolbar API but thats create_Toolbar
            method to create your own toolbars is disabled
            (reason: no reduction of map screen estate wanted and a
            toolbar toggle is some clicks too many, the author of this
            plugin interface feels such not warranted for an "unobtrusive"
            plugin).
            in the object returned by message.pluginParent.callback:
            "request_MapAccess" not available
            call "run" to make your plugin visible
        
          message.pluginParent.callback.TYPE_EXCLUSIVE :
            your plugin has its own display instead of the map covering
            the whole area except the menu for which a menu toggle entry
            is added,
            you have the toolbar API at your disposal to create a toolbar
            using the existing theme but you may create an entire ui yourself;
            if you use the toolbar API, call createToolbar first, otherwise
            you cannot create toolbar entries because the whole area an
            exclusive plugin covers includes the map toolbar which would be
            used by default for new toolbar entries when you don't provide
            your own toolbar.
            in the object returned by message.pluginParent.callback:
            "request_MapAccess" not available
            call "run" to make your plugin visible
          
          
          stop_Method: function
          
          The user has the possibility to disable your plugin at any time through
          the plugin menu at which point stop_Method() is called. Provide it and
          restore any state in the map's DOM pre-enablation of your plugin. 
          Except for message.pluginParent.callback.TYPE_BACKGROUND it is a
          courtesy function which might not need to do anything.
          
          Note: stop_Method is attempted to be called when your plugin fails to
                initialise, also, when you "throw" in init, safeguard stop_Method
                to not "undo" anything which might not have been done in the
                first place!
        */
        
      }
    </script>
  </body>
</html>